<ul class="admin-subnav" data-hook="admin_settings_sub_tabs">
  <% if can?(:edit, :general_settings) %>
    <%= tab :general_settings, label: :general, url: spree.edit_admin_general_settings_path, match_path: /\/general_settings/ %>
  <% end %>

  <% if can?(:display, Spree::PaymentMethod) %>
    <%= tab :payments, url: spree.admin_payment_methods_path %>
  <% end %>

  <% if can?(:display, Spree::Zone) || can?(:display, Spree::Country) || can?(:display, Spree::State) %>
    <%= tab :areas, url: spree.admin_zones_path %>
  <% end %>

  <% if can?(:display, Spree::TaxCategory) || can?(:display, Spree::TaxRate) %>
    <%= tab :taxes, url: spree.admin_tax_categories_path %>
  <% end %>

  <% if can?(:display, Spree::RefundReason) || can?(:display, Spree::ReimbursementType) ||
     can?(:display, Spree::ReturnReason) || can?(:display, Spree::AdjustmentReason) %>
    <%= tab :checkout, url: spree.admin_refund_reasons_path %>
  <% end %>

  <% if can?(:display, Spree::ShippingMethod) || can?(:display, Spree::ShippingCategory) || can?(:display, Spree::StockLocation) %>
    <%= tab :shipping, url: spree.admin_shipping_methods_path, match_path: %r(shipping_methods|shipping_categories|stock_locations) %>
  <% end %>
</ul>
